import { request } from '../service'
import IBaseObj from '#/index'

const getVisitList = (pid: number | string) =>
  request({
    url: `/visit/plan/list?pid=${pid}`,
    method: 'GET',
  })

const createVisitBatch = (data: IBaseObj) =>
  request({
    url: '/visit/plan/save/batch',
    method: 'POST',
    data,
  })

const getVisitInfo = (vid: number | string) =>
  request({
    url: `/visit/info/${vid}`,
    method: 'GET',
  })

const getVisitInfoList = (subId: number | string) =>
  request({
    url: `/visit/info/list/${subId}`,
    method: 'GET',
  })

export default {
  getVisitList,
  createVisitBatch,
  getVisitInfo,
  getVisitInfoList,
}
